{extend name="layout/edit" /}
{block name="form"}

<form id="form">
	<input type="hidden" value="{$info.id}" name="id" />

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["name"]["name"]}</label>
		<input class="form-control" type="text" placeholder="" name="name" value="{$info["name"]}">
	</div>
<!--
	<div class="form-group">
		<label class="control-label">{$tables["fields"]["keyword"]["name"]}</label>
		<input class="form-control" type="text" placeholder="" name="keyword" value="{$info["keyword"]}">
	</div>
	-->

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["value"]["name"]}</label>
		<textarea class="form-control" name="value" rows="5">{$info["value"]}</textarea>
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["create_time"]["name"]}</label>
		<div class="input-group date" id="create_time" data-target-input="nearest">
			<input type="text" name="create_time" class="form-control datetimepicker-input" data-target="#create_time" value="{$info["create_time"]}"/>
			<div class="input-group-append" data-target="#create_time" data-toggle="datetimepicker">
				<div class="input-group-text"><i class="fa fa-calendar"></i></div>
			</div>
		</div>
	</div>

	<div class="tile-footer">
		<button class="btn btn-primary" type="button" id="submitbutton">
			<i class="fa fa-fw fa-lg fa-check-circle"></i>提交
		</button>   
		{if checkurl($now_route["controller"]."/delete")}
		<button type="button"  class="btn btn-secondary delete" data-href="{:url("delete",array("id"=>$info["id"]))}" >
			<i class="fa fa-fw fa-lg fa-times-circle"></i>删除
		</button>
		{/if}
	</div>
</form>

{/block}
{block name="javascript"}
<script>
$(function () {
$("#create_time").datetimepicker({
locale: moment.locale("zh-cn"),
});
});
</script>
{/block}
